﻿@using InnovaApp.Layers.ResourcesLayer.Properties
@model InnovaApp.Portals.MVC4Portal.Models.AdvancedSamples_AddressesManagementModel
@section featured {
	<section class="featured">
		<div class="content-wrapper">
			<hgroup class="title">
				<h1>@Model._PageTitle</h1>
				<h2>@Model._PageMessage</h2>
			</hgroup>
			<p class="message-info">
				@Resources.View_AdvancedSamples_AddressesManagement_Help.
			</p>
		</div>
	</section>
}
@using (Ajax.BeginForm(new AjaxOptions() { HttpMethod = "Post", OnSuccess = "$.fn.MainAjaxSuccess", OnFailure = "$.fn.MainAjaxFailure" }))
{
	<section>
		<div id="divForm"> 
			<div>
				@Html.Partial("_ContactViewer", Model.CurrentContact)
			</div>
			<div class="divAddressList formHeight">
				<ol id="lstSelector">
					<li value="-1" class="ui-widget-content ui-selected">@Resources.View_AdvancedSamples_AddressesManagement_NewOne</li>
					@foreach (var item in Model.Addresses)
					{ 
						<li value="@item.Value" class="ui-widget-content">@item.Text</li>
					}
				</ol>
			</div>
			<fieldset>
				<div class="divAddressForm rightForm formHeight">
					@Html.EditorFor(m => m.CurrentAddress)
				</div>
			</fieldset>
		</div>
	</section>
}
@if (Model.InvolvedCode != null)
{
	if (Model.InvolvedCode.Count > 0)
	{ 
	<section>
		<span class="involvedCode">@Resources.Views_All_InvolvedCode</span>
		<div id="divInvolvedCode">
			@Html.Partial("_InvolvedCode", Model.InvolvedCode)
		</div>
	</section>
	}
}